<template>
  <el-form-item :label="constantDic.designer.setting.label" v-if="!noLabelSetting">
    <el-input type="text" v-model="optionModel['label']"/>
  </el-form-item>
</template>

<script>
import constantDic from "@/utils/vue-i18n/lang/zh-CN";

export default {
  name: "label-editor",

  componentName: "label-editor",

  mixins: [],

  props: {
    designer: Object,
    selectedWidget: Object,
    optionModel: Object,
  },

  data() {
    return {
      constantDic: constantDic,
    }
  },

  computed: {
    noLabelSetting() {
      return (this.selectedWidget.type === 'static-text') || (this.selectedWidget.type === 'html-text')
    },
  }
}
</script>